// $ANTLR 3.0.1 C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g 2008-08-25 22:09:15

package ac.jp.u_tokyo.SyncLib.language2;
import java.util.LinkedList;
import java.util.List;
import ac.jp.u_tokyo.SyncLib.language.*;



import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

public class LanguageParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "CONST", "TRUE", "FALSE", "NULL", "FOR", "IN", "VAR", "DIGIT", "ULETTER", "LLETTER", "LETTER", "NUMBER", "NAME", "STRING", "COMMENT", "LINE_COMMENT", "WS", "INCLUDE", "':='", "'<'", "','", "'>'", "'='", "'('", "')'", "'|'", "'{'", "';'", "'}'", "'.'", "'!'", "'=='", "'<>'", "'['", "']'"
    };
    public static final int ULETTER=12;
    public static final int LINE_COMMENT=19;
    public static final int LETTER=14;
    public static final int CONST=4;
    public static final int NULL=7;
    public static final int NUMBER=15;
    public static final int FOR=8;
    public static final int EOF=-1;
    public static final int TRUE=5;
    public static final int LLETTER=13;
    public static final int NAME=16;
    public static final int WS=20;
    public static final int IN=9;
    public static final int INCLUDE=21;
    public static final int VAR=10;
    public static final int DIGIT=11;
    public static final int COMMENT=18;
    public static final int FALSE=6;
    public static final int STRING=17;

        public LanguageParser(TokenStream input) {
            super(input);
        }
        

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g"; }

    
    	HigherProgram _program;
    	public static class CustomMsgException extends RecognitionException {
    		private String message;
    		public String getMessage() {
    			return message;
    		}
    		public CustomMsgException(String msg, int line, int charPositionInLine) {
    			message = msg;
        		super.line = line;
        		super.charPositionInLine = charPositionInLine;
        	}
    		public CustomMsgException(String msg, IntStream stream) {
    			super(stream);
    			message = msg;
    		}
    	}
    	
    	public void displayRecognitionError(String as[], RecognitionException exp) {
    		if (exp instanceof CustomMsgException)
    			emitErrorMessage(getErrorHeader(exp) + " " + ((CustomMsgException)exp).getMessage());
    		else
    			super.displayRecognitionError(as, exp);
    	}
    	
    



    // $ANTLR start prog
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:148:1: prog returns [HigherProgram result] : synchronizer_decls EOF ;
    public final HigherProgram prog() throws RecognitionException {
        HigherProgram result = null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:149:3: ( synchronizer_decls EOF )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:149:5: synchronizer_decls EOF
            {
            _program = new HigherProgram();
            pushFollow(FOLLOW_synchronizer_decls_in_prog412);
            synchronizer_decls();
            _fsp--;

            match(input,EOF,FOLLOW_EOF_in_prog414); 
            result = _program;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end prog


    // $ANTLR start synchronizer_decls
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:150:1: synchronizer_decls : s1= synchronizer_decl ( synchronizer_decls )? ;
    public final void synchronizer_decls() throws RecognitionException {
        HigherSyncDecl s1 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:151:2: (s1= synchronizer_decl ( synchronizer_decls )? )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:151:4: s1= synchronizer_decl ( synchronizer_decls )?
            {
            pushFollow(FOLLOW_synchronizer_decl_in_synchronizer_decls427);
            s1=synchronizer_decl();
            _fsp--;

            _program.addDecl(s1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:153:2: ( synchronizer_decls )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==NAME) ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:153:3: synchronizer_decls
                    {
                    pushFollow(FOLLOW_synchronizer_decls_in_synchronizer_decls436);
                    synchronizer_decls();
                    _fsp--;


                    }
                    break;

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end synchronizer_decls


    // $ANTLR start synchronizer_decl
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:155:1: synchronizer_decl returns [HigherSyncDecl result] : NAME ( generic_para_list[$result] )? para_list[$result] ':=' disjunction ;
    public final HigherSyncDecl synchronizer_decl() throws RecognitionException {
        HigherSyncDecl result = null;

        Token NAME1=null;
        SyncConstruct disjunction2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:156:2: ( NAME ( generic_para_list[$result] )? para_list[$result] ':=' disjunction )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:156:4: NAME ( generic_para_list[$result] )? para_list[$result] ':=' disjunction
            {
            result = new HigherSyncDecl();
            NAME1=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_synchronizer_decl456); 
            result.setName(NAME1.getText());
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:159:2: ( generic_para_list[$result] )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==23) ) {
                alt2=1;
            }
            switch (alt2) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:159:3: generic_para_list[$result]
                    {
                    pushFollow(FOLLOW_generic_para_list_in_synchronizer_decl463);
                    generic_para_list(result);
                    _fsp--;


                    }
                    break;

            }

            pushFollow(FOLLOW_para_list_in_synchronizer_decl468);
            para_list(result);
            _fsp--;

            match(input,22,FOLLOW_22_in_synchronizer_decl471); 
            pushFollow(FOLLOW_disjunction_in_synchronizer_decl475);
            disjunction2=disjunction();
            _fsp--;

            result.setSync(disjunction2);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end synchronizer_decl


    // $ANTLR start generic_para_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:162:1: generic_para_list[HigherSyncDecl decl] : '<' generic_para_decl[decl] ( ',' generic_para_decl[decl] )* '>' ;
    public final void generic_para_list(HigherSyncDecl decl) throws RecognitionException {
        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:163:2: ( '<' generic_para_decl[decl] ( ',' generic_para_decl[decl] )* '>' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:163:4: '<' generic_para_decl[decl] ( ',' generic_para_decl[decl] )* '>'
            {
            match(input,23,FOLLOW_23_in_generic_para_list488); 
            pushFollow(FOLLOW_generic_para_decl_in_generic_para_list490);
            generic_para_decl(decl);
            _fsp--;

            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:163:32: ( ',' generic_para_decl[decl] )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==24) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:163:33: ',' generic_para_decl[decl]
            	    {
            	    match(input,24,FOLLOW_24_in_generic_para_list494); 
            	    pushFollow(FOLLOW_generic_para_decl_in_generic_para_list496);
            	    generic_para_decl(decl);
            	    _fsp--;


            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);

            match(input,25,FOLLOW_25_in_generic_para_list501); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end generic_para_list


    // $ANTLR start generic_para_decl
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:165:1: generic_para_decl[HigherSyncDecl decl] : NAME ( '=' const_value )? ;
    public final void generic_para_decl(HigherSyncDecl decl) throws RecognitionException {
        Token NAME4=null;
        Const const_value3 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:166:2: ( NAME ( '=' const_value )? )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:166:4: NAME ( '=' const_value )?
            {
            Const defaultValue = null;
            NAME4=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_generic_para_decl516); 
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:167:7: ( '=' const_value )?
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==26) ) {
                alt4=1;
            }
            switch (alt4) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:167:8: '=' const_value
                    {
                    match(input,26,FOLLOW_26_in_generic_para_decl519); 
                    pushFollow(FOLLOW_const_value_in_generic_para_decl521);
                    const_value3=const_value();
                    _fsp--;

                    defaultValue = const_value3;

                    }
                    break;

            }

             decl.addGenericParameter(NAME4.getText(), defaultValue, NAME4.getLine());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end generic_para_decl


    // $ANTLR start para_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:171:1: para_list[HigherSyncDecl decl] : '(' para[decl] ( ',' para[decl] )* ')' ;
    public final void para_list(HigherSyncDecl decl) throws RecognitionException {
        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:172:2: ( '(' para[decl] ( ',' para[decl] )* ')' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:172:4: '(' para[decl] ( ',' para[decl] )* ')'
            {
            match(input,27,FOLLOW_27_in_para_list542); 
            pushFollow(FOLLOW_para_in_para_list544);
            para(decl);
            _fsp--;

            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:172:19: ( ',' para[decl] )*
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( (LA5_0==24) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:172:20: ',' para[decl]
            	    {
            	    match(input,24,FOLLOW_24_in_para_list548); 
            	    pushFollow(FOLLOW_para_in_para_list550);
            	    para(decl);
            	    _fsp--;


            	    }
            	    break;

            	default :
            	    break loop5;
                }
            } while (true);

            match(input,28,FOLLOW_28_in_para_list555); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end para_list


    // $ANTLR start para
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:174:1: para[HigherSyncDecl decl] : var ;
    public final void para(HigherSyncDecl decl) throws RecognitionException {
        Var var5 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:175:3: ( var )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:175:5: var
            {
            pushFollow(FOLLOW_var_in_para567);
            var5=var();
            _fsp--;

            decl.addVar(var5);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end para


    // $ANTLR start disjunction
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:177:1: disjunction returns [SyncConstruct result] : s1= single_sync ( '|' s2= single_sync )* ;
    public final SyncConstruct disjunction() throws RecognitionException {
        SyncConstruct result = null;

        SyncConstruct s1 = null;

        SyncConstruct s2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:178:2: (s1= single_sync ( '|' s2= single_sync )* )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:178:4: s1= single_sync ( '|' s2= single_sync )*
            {
            pushFollow(FOLLOW_single_sync_in_disjunction585);
            s1=single_sync();
            _fsp--;

             Disjunction disjunction = new Disjunction(s1.getLine());
            	  disjunction.addInner(s1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:181:2: ( '|' s2= single_sync )*
            loop6:
            do {
                int alt6=2;
                int LA6_0 = input.LA(1);

                if ( (LA6_0==29) ) {
                    alt6=1;
                }


                switch (alt6) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:181:3: '|' s2= single_sync
            	    {
            	    match(input,29,FOLLOW_29_in_disjunction593); 
            	    pushFollow(FOLLOW_single_sync_in_disjunction597);
            	    s2=single_sync();
            	    _fsp--;

            	    disjunction.addInner(s2);

            	    }
            	    break;

            	default :
            	    break loop6;
                }
            } while (true);

            if (disjunction.getInnerCount() == 1) 
            		result = disjunction.getFirst();
            	 else
            		result = disjunction;
            	

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end disjunction


    // $ANTLR start single_sync
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:189:1: single_sync returns [SyncConstruct result] : ( sync_ref | conjunction | map | expr | '(' disjunction ')' );
    public final SyncConstruct single_sync() throws RecognitionException {
        SyncConstruct result = null;

        SyncRefConstruct sync_ref6 = null;

        Conjunction conjunction7 = null;

        ForMap map8 = null;

        SyncConstruct expr9 = null;

        SyncConstruct disjunction10 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:190:2: ( sync_ref | conjunction | map | expr | '(' disjunction ')' )
            int alt7=5;
            switch ( input.LA(1) ) {
            case NAME:
                {
                int LA7_1 = input.LA(2);

                if ( (LA7_1==26||LA7_1==33||(LA7_1>=35 && LA7_1<=36)) ) {
                    alt7=4;
                }
                else if ( (LA7_1==23||LA7_1==27) ) {
                    alt7=1;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("189:1: single_sync returns [SyncConstruct result] : ( sync_ref | conjunction | map | expr | '(' disjunction ')' );", 7, 1, input);

                    throw nvae;
                }
                }
                break;
            case 30:
                {
                alt7=2;
                }
                break;
            case FOR:
                {
                alt7=3;
                }
                break;
            case 34:
                {
                alt7=4;
                }
                break;
            case 27:
                {
                alt7=5;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("189:1: single_sync returns [SyncConstruct result] : ( sync_ref | conjunction | map | expr | '(' disjunction ')' );", 7, 0, input);

                throw nvae;
            }

            switch (alt7) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:190:5: sync_ref
                    {
                    pushFollow(FOLLOW_sync_ref_in_single_sync621);
                    sync_ref6=sync_ref();
                    _fsp--;

                    result = sync_ref6;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:191:4: conjunction
                    {
                    pushFollow(FOLLOW_conjunction_in_single_sync628);
                    conjunction7=conjunction();
                    _fsp--;

                    result = conjunction7;

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:192:4: map
                    {
                    pushFollow(FOLLOW_map_in_single_sync636);
                    map8=map();
                    _fsp--;

                    result = map8;

                    }
                    break;
                case 4 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:193:4: expr
                    {
                    pushFollow(FOLLOW_expr_in_single_sync643);
                    expr9=expr();
                    _fsp--;

                    result = expr9;

                    }
                    break;
                case 5 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:194:4: '(' disjunction ')'
                    {
                    match(input,27,FOLLOW_27_in_single_sync650); 
                    pushFollow(FOLLOW_disjunction_in_single_sync652);
                    disjunction10=disjunction();
                    _fsp--;

                    match(input,28,FOLLOW_28_in_single_sync654); 
                    result = disjunction10;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end single_sync


    // $ANTLR start conjunction
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:196:1: conjunction returns [Conjunction result] : start= '{' ( var_decl[$result] )? inner1= disjunction ';' (inner2= disjunction ';' )* '}' ;
    public final Conjunction conjunction() throws RecognitionException {
        Conjunction result = null;

        Token start=null;
        SyncConstruct inner1 = null;

        SyncConstruct inner2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:197:2: (start= '{' ( var_decl[$result] )? inner1= disjunction ';' (inner2= disjunction ';' )* '}' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:197:4: start= '{' ( var_decl[$result] )? inner1= disjunction ';' (inner2= disjunction ';' )* '}'
            {
            start=(Token)input.LT(1);
            match(input,30,FOLLOW_30_in_conjunction672); 
             result = new Conjunction(start.getLine());
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:198:2: ( var_decl[$result] )?
            int alt8=2;
            int LA8_0 = input.LA(1);

            if ( (LA8_0==VAR) ) {
                alt8=1;
            }
            switch (alt8) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:198:2: var_decl[$result]
                    {
                    pushFollow(FOLLOW_var_decl_in_conjunction678);
                    var_decl(result);
                    _fsp--;


                    }
                    break;

            }

            pushFollow(FOLLOW_disjunction_in_conjunction686);
            inner1=disjunction();
            _fsp--;

            match(input,31,FOLLOW_31_in_conjunction688); 
             result.addInner(inner1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:200:2: (inner2= disjunction ';' )*
            loop9:
            do {
                int alt9=2;
                int LA9_0 = input.LA(1);

                if ( (LA9_0==FOR||LA9_0==NAME||LA9_0==27||LA9_0==30||LA9_0==34) ) {
                    alt9=1;
                }


                switch (alt9) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:200:3: inner2= disjunction ';'
            	    {
            	    pushFollow(FOLLOW_disjunction_in_conjunction697);
            	    inner2=disjunction();
            	    _fsp--;

            	    match(input,31,FOLLOW_31_in_conjunction699); 
            	     result.addInner(inner2);

            	    }
            	    break;

            	default :
            	    break loop9;
                }
            } while (true);

            match(input,32,FOLLOW_32_in_conjunction706); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end conjunction


    // $ANTLR start var_decl
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:203:1: var_decl[Conjunction c] : VAR v1= var ( ',' v2= var )* ';' ;
    public final void var_decl(Conjunction c) throws RecognitionException {
        Var v1 = null;

        Var v2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:204:2: ( VAR v1= var ( ',' v2= var )* ';' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:204:4: VAR v1= var ( ',' v2= var )* ';'
            {
            match(input,VAR,FOLLOW_VAR_in_var_decl718); 
            pushFollow(FOLLOW_var_in_var_decl722);
            v1=var();
            _fsp--;

            c.addVar(v1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:204:30: ( ',' v2= var )*
            loop10:
            do {
                int alt10=2;
                int LA10_0 = input.LA(1);

                if ( (LA10_0==24) ) {
                    alt10=1;
                }


                switch (alt10) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:204:31: ',' v2= var
            	    {
            	    match(input,24,FOLLOW_24_in_var_decl726); 
            	    pushFollow(FOLLOW_var_in_var_decl730);
            	    v2=var();
            	    _fsp--;

            	    c.addVar(v2);

            	    }
            	    break;

            	default :
            	    break loop10;
                }
            } while (true);

            match(input,31,FOLLOW_31_in_var_decl736); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end var_decl


    // $ANTLR start sync_ref
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:206:1: sync_ref returns [SyncRefConstruct result] : NAME ( generic_arg_list[$result] )? var_list[$result] ;
    public final SyncRefConstruct sync_ref() throws RecognitionException {
        SyncRefConstruct result = null;

        Token NAME11=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:207:2: ( NAME ( generic_arg_list[$result] )? var_list[$result] )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:207:4: NAME ( generic_arg_list[$result] )? var_list[$result]
            {
            NAME11=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_sync_ref749); 
             result = new SyncRefConstruct(NAME11.getLine(), _program.getLowerProgram());
            	  result.setName(NAME11.getText());
            	
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:211:3: ( generic_arg_list[$result] )?
            int alt11=2;
            int LA11_0 = input.LA(1);

            if ( (LA11_0==23) ) {
                alt11=1;
            }
            switch (alt11) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:211:3: generic_arg_list[$result]
                    {
                    pushFollow(FOLLOW_generic_arg_list_in_sync_ref756);
                    generic_arg_list(result);
                    _fsp--;


                    }
                    break;

            }

            pushFollow(FOLLOW_var_list_in_sync_ref760);
            var_list(result);
            _fsp--;


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end sync_ref


    // $ANTLR start generic_arg_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:213:1: generic_arg_list[SyncRefConstruct c] : '<' NAME '=' const_value '>' ;
    public final void generic_arg_list(SyncRefConstruct c) throws RecognitionException {
        Token NAME12=null;
        Const const_value13 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:214:2: ( '<' NAME '=' const_value '>' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:214:4: '<' NAME '=' const_value '>'
            {
            match(input,23,FOLLOW_23_in_generic_arg_list771); 
            NAME12=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_generic_arg_list773); 
            match(input,26,FOLLOW_26_in_generic_arg_list775); 
            pushFollow(FOLLOW_const_value_in_generic_arg_list777);
            const_value13=const_value();
            _fsp--;

            match(input,25,FOLLOW_25_in_generic_arg_list779); 
            c.addGenericArg(NAME12.getText(), const_value13);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end generic_arg_list


    // $ANTLR start var_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:216:1: var_list[SyncRefConstruct c] : '(' v1= var ( ',' v2= var )* ')' ;
    public final void var_list(SyncRefConstruct c) throws RecognitionException {
        Var v1 = null;

        Var v2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:217:2: ( '(' v1= var ( ',' v2= var )* ')' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:217:4: '(' v1= var ( ',' v2= var )* ')'
            {
            match(input,27,FOLLOW_27_in_var_list792); 
            pushFollow(FOLLOW_var_in_var_list796);
            v1=var();
            _fsp--;

            c.addArg(v1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:218:2: ( ',' v2= var )*
            loop12:
            do {
                int alt12=2;
                int LA12_0 = input.LA(1);

                if ( (LA12_0==24) ) {
                    alt12=1;
                }


                switch (alt12) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:218:3: ',' v2= var
            	    {
            	    match(input,24,FOLLOW_24_in_var_list803); 
            	    pushFollow(FOLLOW_var_in_var_list807);
            	    v2=var();
            	    _fsp--;

            	    c.addArg(v2);

            	    }
            	    break;

            	default :
            	    break loop12;
                }
            } while (true);

            match(input,28,FOLLOW_28_in_var_list813); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end var_list


    // $ANTLR start expr
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:220:1: expr returns [SyncConstruct result] : (e1= varexpr | v1= var ) op (e2= varexpr | NAME | const_value_no_ref ) ;
    public final SyncConstruct expr() throws RecognitionException {
        SyncConstruct result = null;

        Token NAME15=null;
        VarExpr e1 = null;

        Var v1 = null;

        VarExpr e2 = null;

        op_return op14 = null;

        Const const_value_no_ref16 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:221:2: ( (e1= varexpr | v1= var ) op (e2= varexpr | NAME | const_value_no_ref ) )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:221:5: (e1= varexpr | v1= var ) op (e2= varexpr | NAME | const_value_no_ref )
            {
            Part left = null; VarExprPart leftVarExpr = null; VarExpr rightExpr = null; String rightRef = null; Const rightConst = null;
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:222:2: (e1= varexpr | v1= var )
            int alt13=2;
            int LA13_0 = input.LA(1);

            if ( (LA13_0==NAME) ) {
                int LA13_1 = input.LA(2);

                if ( (LA13_1==33) ) {
                    alt13=1;
                }
                else if ( (LA13_1==26||(LA13_1>=35 && LA13_1<=36)) ) {
                    alt13=2;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("222:2: (e1= varexpr | v1= var )", 13, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA13_0==34) ) {
                alt13=1;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("222:2: (e1= varexpr | v1= var )", 13, 0, input);

                throw nvae;
            }
            switch (alt13) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:222:4: e1= varexpr
                    {
                    pushFollow(FOLLOW_varexpr_in_expr834);
                    e1=varexpr();
                    _fsp--;

                    leftVarExpr = new VarExprPart(e1, true);  left = leftVarExpr;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:223:6: v1= var
                    {
                    pushFollow(FOLLOW_var_in_expr846);
                    v1=var();
                    _fsp--;

                    left = new VarPart(v1);

                    }
                    break;

            }

            pushFollow(FOLLOW_op_in_expr855);
            op14=op();
            _fsp--;

             if (op14.result != ExprType.EQUAL && leftVarExpr != null) leftVarExpr.setAtLeft(false);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:226:2: (e2= varexpr | NAME | const_value_no_ref )
            int alt14=3;
            switch ( input.LA(1) ) {
            case NAME:
                {
                int LA14_1 = input.LA(2);

                if ( (LA14_1==EOF||LA14_1==NAME||(LA14_1>=28 && LA14_1<=29)||LA14_1==31) ) {
                    alt14=2;
                }
                else if ( (LA14_1==33) ) {
                    alt14=1;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("226:2: (e2= varexpr | NAME | const_value_no_ref )", 14, 1, input);

                    throw nvae;
                }
                }
                break;
            case 34:
                {
                alt14=1;
                }
                break;
            case TRUE:
            case FALSE:
            case NULL:
            case NUMBER:
            case STRING:
            case 37:
                {
                alt14=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("226:2: (e2= varexpr | NAME | const_value_no_ref )", 14, 0, input);

                throw nvae;
            }

            switch (alt14) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:226:4: e2= varexpr
                    {
                    pushFollow(FOLLOW_varexpr_in_expr864);
                    e2=varexpr();
                    _fsp--;

                     rightExpr = e2;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:227:6: NAME
                    {
                    NAME15=(Token)input.LT(1);
                    match(input,NAME,FOLLOW_NAME_in_expr874); 
                    rightRef = NAME15.getText();

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:228:6: const_value_no_ref
                    {
                    pushFollow(FOLLOW_const_value_no_ref_in_expr885);
                    const_value_no_ref16=const_value_no_ref();
                    _fsp--;

                    rightConst = const_value_no_ref16;

                    }
                    break;

            }

             result = Helper.constructExpr(op14.line, left, rightExpr, rightRef, rightConst, op14.result);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end expr


    // $ANTLR start varexpr
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:233:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );
    public final VarExpr varexpr() throws RecognitionException {
        VarExpr result = null;

        Var v1 = null;

        Const c1 = null;

        Var v2 = null;

        Var v3 = null;

        Var v4 = null;

        Var v5 = null;

        Var v6 = null;

        Var v7 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:234:2: (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var )
            int alt15=4;
            int LA15_0 = input.LA(1);

            if ( (LA15_0==NAME) ) {
                int LA15_1 = input.LA(2);

                if ( (LA15_1==33) ) {
                    int LA15_3 = input.LA(3);

                    if ( (LA15_3==34) ) {
                        alt15=2;
                    }
                    else if ( ((LA15_3>=TRUE && LA15_3<=NULL)||(LA15_3>=NUMBER && LA15_3<=STRING)||LA15_3==37) ) {
                        alt15=1;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("233:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 15, 3, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("233:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 15, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA15_0==34) ) {
                int LA15_2 = input.LA(2);

                if ( (LA15_2==NAME) ) {
                    int LA15_4 = input.LA(3);

                    if ( (LA15_4==33) ) {
                        int LA15_13 = input.LA(4);

                        if ( (LA15_13==34) ) {
                            alt15=4;
                        }
                        else if ( (LA15_13==NAME) ) {
                            alt15=3;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("233:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 15, 13, input);

                            throw nvae;
                        }
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("233:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 15, 4, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("233:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 15, 2, input);

                    throw nvae;
                }
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("233:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 15, 0, input);

                throw nvae;
            }
            switch (alt15) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:234:4: v1= var '.' c1= const_value
                    {
                    pushFollow(FOLLOW_var_in_varexpr911);
                    v1=var();
                    _fsp--;

                    match(input,33,FOLLOW_33_in_varexpr913); 
                    pushFollow(FOLLOW_const_value_in_varexpr917);
                    c1=const_value();
                    _fsp--;

                    SGetExpr s = new SGetExpr(v1.getLine()); s.setKey(c1); s.setDict(v1); result =s;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:236:4: v2= var '.' '!' v3= var
                    {
                    pushFollow(FOLLOW_var_in_varexpr929);
                    v2=var();
                    _fsp--;

                    match(input,33,FOLLOW_33_in_varexpr931); 
                    match(input,34,FOLLOW_34_in_varexpr933); 
                    pushFollow(FOLLOW_var_in_varexpr937);
                    v3=var();
                    _fsp--;

                    result = new KVDGetExpr(v2.getLine(), v2, v3);

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:237:4: '!' v4= var '.' v5= var
                    {
                    match(input,34,FOLLOW_34_in_varexpr945); 
                    pushFollow(FOLLOW_var_in_varexpr949);
                    v4=var();
                    _fsp--;

                    match(input,33,FOLLOW_33_in_varexpr951); 
                    pushFollow(FOLLOW_var_in_varexpr955);
                    v5=var();
                    _fsp--;

                    result = new DVDGetExpr(v4.getLine(), v4, v5);

                    }
                    break;
                case 4 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:238:4: '!' v6= var '.' '!' v7= var
                    {
                    match(input,34,FOLLOW_34_in_varexpr962); 
                    pushFollow(FOLLOW_var_in_varexpr966);
                    v6=var();
                    _fsp--;

                    match(input,33,FOLLOW_33_in_varexpr968); 
                    match(input,34,FOLLOW_34_in_varexpr970); 
                    pushFollow(FOLLOW_var_in_varexpr974);
                    v7=var();
                    _fsp--;

                    result = new KDVDGetExpr(v6.getLine(), v6, v7);

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end varexpr

    public static class op_return extends ParserRuleReturnScope {
        public ExprType result;
        public int line;
    };

    // $ANTLR start op
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:240:1: op returns [ExprType result, int line] : (c1= '=' | c2= '==' | c3= '<>' );
    public final op_return op() throws RecognitionException {
        op_return retval = new op_return();
        retval.start = input.LT(1);

        Token c1=null;
        Token c2=null;
        Token c3=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:241:2: (c1= '=' | c2= '==' | c3= '<>' )
            int alt16=3;
            switch ( input.LA(1) ) {
            case 26:
                {
                alt16=1;
                }
                break;
            case 35:
                {
                alt16=2;
                }
                break;
            case 36:
                {
                alt16=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("240:1: op returns [ExprType result, int line] : (c1= '=' | c2= '==' | c3= '<>' );", 16, 0, input);

                throw nvae;
            }

            switch (alt16) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:241:4: c1= '='
                    {
                    c1=(Token)input.LT(1);
                    match(input,26,FOLLOW_26_in_op992); 
                    retval.result = ExprType.EQUAL; retval.line =c1.getLine();

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:242:4: c2= '=='
                    {
                    c2=(Token)input.LT(1);
                    match(input,35,FOLLOW_35_in_op1002); 
                    retval.result = ExprType.TESTEQUAL; retval.line =c2.getLine();

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:243:4: c3= '<>'
                    {
                    c3=(Token)input.LT(1);
                    match(input,36,FOLLOW_36_in_op1011); 
                    retval.result = ExprType.NOTEQUAL;retval.line =c3.getLine();

                    }
                    break;

            }
            retval.stop = input.LT(-1);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end op


    // $ANTLR start map
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:245:1: map returns [ForMap result] : FOR map_var_list[$result] IN dict_list[$result] single_sync ;
    public final ForMap map() throws RecognitionException {
        ForMap result = null;

        Token FOR17=null;
        SyncConstruct single_sync18 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:246:2: ( FOR map_var_list[$result] IN dict_list[$result] single_sync )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:246:4: FOR map_var_list[$result] IN dict_list[$result] single_sync
            {
            FOR17=(Token)input.LT(1);
            match(input,FOR,FOLLOW_FOR_in_map1027); 
            result = new ForMap(FOR17.getLine());
            pushFollow(FOLLOW_map_var_list_in_map1033);
            map_var_list(result);
            _fsp--;

            match(input,IN,FOLLOW_IN_in_map1039); 
            pushFollow(FOLLOW_dict_list_in_map1043);
            dict_list(result);
            _fsp--;

            pushFollow(FOLLOW_single_sync_in_map1048);
            single_sync18=single_sync();
            _fsp--;

            result.setSyncConstruct(single_sync18);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end map


    // $ANTLR start map_var_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:252:1: map_var_list[ForMap c] : '[' entry_bind[c] ( ',' entry_bind[c] )* ']' ;
    public final void map_var_list(ForMap c) throws RecognitionException {
        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:253:2: ( '[' entry_bind[c] ( ',' entry_bind[c] )* ']' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:253:4: '[' entry_bind[c] ( ',' entry_bind[c] )* ']'
            {
            match(input,37,FOLLOW_37_in_map_var_list1059); 
            pushFollow(FOLLOW_entry_bind_in_map_var_list1061);
            entry_bind(c);
            _fsp--;

            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:253:22: ( ',' entry_bind[c] )*
            loop17:
            do {
                int alt17=2;
                int LA17_0 = input.LA(1);

                if ( (LA17_0==24) ) {
                    alt17=1;
                }


                switch (alt17) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:253:23: ',' entry_bind[c]
            	    {
            	    match(input,24,FOLLOW_24_in_map_var_list1065); 
            	    pushFollow(FOLLOW_entry_bind_in_map_var_list1067);
            	    entry_bind(c);
            	    _fsp--;


            	    }
            	    break;

            	default :
            	    break loop17;
                }
            } while (true);

            match(input,38,FOLLOW_38_in_map_var_list1072); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end map_var_list


    // $ANTLR start entry_bind
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:255:1: entry_bind[ForMap c] : (v1= var | '<' k2= var ',' v2= var '>' );
    public final void entry_bind(ForMap c) throws RecognitionException {
        Var v1 = null;

        Var k2 = null;

        Var v2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:256:2: (v1= var | '<' k2= var ',' v2= var '>' )
            int alt18=2;
            int LA18_0 = input.LA(1);

            if ( (LA18_0==NAME) ) {
                alt18=1;
            }
            else if ( (LA18_0==23) ) {
                alt18=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("255:1: entry_bind[ForMap c] : (v1= var | '<' k2= var ',' v2= var '>' );", 18, 0, input);

                throw nvae;
            }
            switch (alt18) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:256:4: v1= var
                    {
                    pushFollow(FOLLOW_var_in_entry_bind1085);
                    v1=var();
                    _fsp--;

                    c.addValueBinding(v1);

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:257:4: '<' k2= var ',' v2= var '>'
                    {
                    match(input,23,FOLLOW_23_in_entry_bind1093); 
                    pushFollow(FOLLOW_var_in_entry_bind1097);
                    k2=var();
                    _fsp--;

                    match(input,24,FOLLOW_24_in_entry_bind1099); 
                    pushFollow(FOLLOW_var_in_entry_bind1103);
                    v2=var();
                    _fsp--;

                    match(input,25,FOLLOW_25_in_entry_bind1105); 
                    c.addPairBinding(k2, v2);

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end entry_bind


    // $ANTLR start dict_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:259:1: dict_list[ForMap c] : ( '[' | '<' ) v1= var ( ',' v2= var )* ( '>' | ']' ) ;
    public final void dict_list(ForMap c) throws RecognitionException {
        Var v1 = null;

        Var v2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:260:2: ( ( '[' | '<' ) v1= var ( ',' v2= var )* ( '>' | ']' ) )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:260:4: ( '[' | '<' ) v1= var ( ',' v2= var )* ( '>' | ']' )
            {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:260:4: ( '[' | '<' )
            int alt19=2;
            int LA19_0 = input.LA(1);

            if ( (LA19_0==37) ) {
                alt19=1;
            }
            else if ( (LA19_0==23) ) {
                alt19=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("260:4: ( '[' | '<' )", 19, 0, input);

                throw nvae;
            }
            switch (alt19) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:260:5: '['
                    {
                    match(input,37,FOLLOW_37_in_dict_list1119); 
                    c.setEqualMap(true);

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:260:34: '<'
                    {
                    match(input,23,FOLLOW_23_in_dict_list1125); 
                    c.setEqualMap(false);

                    }
                    break;

            }

            pushFollow(FOLLOW_var_in_dict_list1133);
            v1=var();
            _fsp--;

            c.addDictionary(v1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:262:2: ( ',' v2= var )*
            loop20:
            do {
                int alt20=2;
                int LA20_0 = input.LA(1);

                if ( (LA20_0==24) ) {
                    alt20=1;
                }


                switch (alt20) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:262:3: ',' v2= var
            	    {
            	    match(input,24,FOLLOW_24_in_dict_list1140); 
            	    pushFollow(FOLLOW_var_in_dict_list1144);
            	    v2=var();
            	    _fsp--;

            	    c.addDictionary(v2);

            	    }
            	    break;

            	default :
            	    break loop20;
                }
            } while (true);

            if ( input.LA(1)==25||input.LA(1)==38 ) {
                input.consume();
                errorRecovery=false;
            }
            else {
                MismatchedSetException mse =
                    new MismatchedSetException(null,input);
                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_dict_list1152);    throw mse;
            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end dict_list


    // $ANTLR start var
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:266:1: var returns [Var result] : NAME ;
    public final Var var() throws RecognitionException {
        Var result = null;

        Token NAME19=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:267:2: ( NAME )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:267:4: NAME
            {
            NAME19=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_var1173); 
            result = new Var(NAME19.getText(), NAME19.getLine());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end var


    // $ANTLR start const_value
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:269:1: const_value returns [Const result] : ( value_ref | const_value_no_ref );
    public final Const const_value() throws RecognitionException {
        Const result = null;

        ConstRef value_ref20 = null;

        Const const_value_no_ref21 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:270:2: ( value_ref | const_value_no_ref )
            int alt21=2;
            int LA21_0 = input.LA(1);

            if ( (LA21_0==NAME) ) {
                alt21=1;
            }
            else if ( ((LA21_0>=TRUE && LA21_0<=NULL)||LA21_0==NUMBER||LA21_0==STRING||LA21_0==37) ) {
                alt21=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("269:1: const_value returns [Const result] : ( value_ref | const_value_no_ref );", 21, 0, input);

                throw nvae;
            }
            switch (alt21) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:270:4: value_ref
                    {
                    pushFollow(FOLLOW_value_ref_in_const_value1188);
                    value_ref20=value_ref();
                    _fsp--;

                    result = value_ref20;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:271:4: const_value_no_ref
                    {
                    pushFollow(FOLLOW_const_value_no_ref_in_const_value1195);
                    const_value_no_ref21=const_value_no_ref();
                    _fsp--;

                    result = const_value_no_ref21;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end const_value


    // $ANTLR start const_value_no_ref
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:273:1: const_value_no_ref returns [Const result] : ( boolean_value | string | NUMBER | NULL | '[' value_list ']' );
    public final Const const_value_no_ref() throws RecognitionException {
        Const result = null;

        Token NUMBER24=null;
        Token NULL25=null;
        BooleanConst boolean_value22 = null;

        string_return string23 = null;

        ArrayConst value_list26 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:274:2: ( boolean_value | string | NUMBER | NULL | '[' value_list ']' )
            int alt22=5;
            switch ( input.LA(1) ) {
            case TRUE:
            case FALSE:
                {
                alt22=1;
                }
                break;
            case STRING:
                {
                alt22=2;
                }
                break;
            case NUMBER:
                {
                alt22=3;
                }
                break;
            case NULL:
                {
                alt22=4;
                }
                break;
            case 37:
                {
                alt22=5;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("273:1: const_value_no_ref returns [Const result] : ( boolean_value | string | NUMBER | NULL | '[' value_list ']' );", 22, 0, input);

                throw nvae;
            }

            switch (alt22) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:274:4: boolean_value
                    {
                    pushFollow(FOLLOW_boolean_value_in_const_value_no_ref1211);
                    boolean_value22=boolean_value();
                    _fsp--;

                    result = boolean_value22;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:275:4: string
                    {
                    pushFollow(FOLLOW_string_in_const_value_no_ref1219);
                    string23=string();
                    _fsp--;

                    result = new StringConst(string23.line, string23.text);

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:276:4: NUMBER
                    {
                    NUMBER24=(Token)input.LT(1);
                    match(input,NUMBER,FOLLOW_NUMBER_in_const_value_no_ref1226); 
                    result = new IntegerConst(NUMBER24.getLine(), new Integer(NUMBER24.getText()));

                    }
                    break;
                case 4 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:277:4: NULL
                    {
                    NULL25=(Token)input.LT(1);
                    match(input,NULL,FOLLOW_NULL_in_const_value_no_ref1233); 
                    result = new NullConst(NULL25.getLine());

                    }
                    break;
                case 5 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:278:4: '[' value_list ']'
                    {
                    match(input,37,FOLLOW_37_in_const_value_no_ref1240); 
                    pushFollow(FOLLOW_value_list_in_const_value_no_ref1242);
                    value_list26=value_list();
                    _fsp--;

                    match(input,38,FOLLOW_38_in_const_value_no_ref1245); 
                    result = value_list26;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end const_value_no_ref


    // $ANTLR start value_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:280:1: value_list returns [ArrayConst result] : (p1= const_value ( ',' p2= const_value )* )? ;
    public final ArrayConst value_list() throws RecognitionException {
        ArrayConst result = null;

        Const p1 = null;

        Const p2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:281:2: ( (p1= const_value ( ',' p2= const_value )* )? )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:282:2: (p1= const_value ( ',' p2= const_value )* )?
            {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:282:2: (p1= const_value ( ',' p2= const_value )* )?
            int alt24=2;
            int LA24_0 = input.LA(1);

            if ( ((LA24_0>=TRUE && LA24_0<=NULL)||(LA24_0>=NUMBER && LA24_0<=STRING)||LA24_0==37) ) {
                alt24=1;
            }
            switch (alt24) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:282:3: p1= const_value ( ',' p2= const_value )*
                    {
                    pushFollow(FOLLOW_const_value_in_value_list1265);
                    p1=const_value();
                    _fsp--;

                    result = new ArrayConst(p1.getLine());result.addInner(p1);
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:283:2: ( ',' p2= const_value )*
                    loop23:
                    do {
                        int alt23=2;
                        int LA23_0 = input.LA(1);

                        if ( (LA23_0==24) ) {
                            alt23=1;
                        }


                        switch (alt23) {
                    	case 1 :
                    	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:283:3: ',' p2= const_value
                    	    {
                    	    match(input,24,FOLLOW_24_in_value_list1272); 
                    	    pushFollow(FOLLOW_const_value_in_value_list1276);
                    	    p2=const_value();
                    	    _fsp--;

                    	    result.addInner(p2);

                    	    }
                    	    break;

                    	default :
                    	    break loop23;
                        }
                    } while (true);


                    }
                    break;

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end value_list


    // $ANTLR start boolean_value
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:285:1: boolean_value returns [BooleanConst result] : ( TRUE | FALSE );
    public final BooleanConst boolean_value() throws RecognitionException {
        BooleanConst result = null;

        Token TRUE27=null;
        Token FALSE28=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:286:2: ( TRUE | FALSE )
            int alt25=2;
            int LA25_0 = input.LA(1);

            if ( (LA25_0==TRUE) ) {
                alt25=1;
            }
            else if ( (LA25_0==FALSE) ) {
                alt25=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("285:1: boolean_value returns [BooleanConst result] : ( TRUE | FALSE );", 25, 0, input);

                throw nvae;
            }
            switch (alt25) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:286:4: TRUE
                    {
                    TRUE27=(Token)input.LT(1);
                    match(input,TRUE,FOLLOW_TRUE_in_boolean_value1295); 
                    result = new BooleanConst(TRUE27.getLine(), true);

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:287:4: FALSE
                    {
                    FALSE28=(Token)input.LT(1);
                    match(input,FALSE,FOLLOW_FALSE_in_boolean_value1302); 
                    result = new BooleanConst(FALSE28.getLine(), false);

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end boolean_value


    // $ANTLR start value_ref
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:289:1: value_ref returns [ConstRef result] : NAME ;
    public final ConstRef value_ref() throws RecognitionException {
        ConstRef result = null;

        Token NAME29=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:290:2: ( NAME )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:290:4: NAME
            {
            NAME29=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_value_ref1317); 
            result = new ConstRef(NAME29.getLine(), NAME29.getText());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end value_ref

    public static class string_return extends ParserRuleReturnScope {
        public String text;
        public int line;
    };

    // $ANTLR start string
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:292:1: string returns [String text, int line] : STRING ;
    public final string_return string() throws RecognitionException {
        string_return retval = new string_return();
        retval.start = input.LT(1);

        Token STRING30=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:293:2: ( STRING )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language2\\Language.g:293:4: STRING
            {
            STRING30=(Token)input.LT(1);
            match(input,STRING,FOLLOW_STRING_in_string1332); 
            retval.text = STRING30.getText().substring(1, STRING30.getText().length() - 1); retval.line = STRING30.getLine();

            }

            retval.stop = input.LT(-1);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end string


 

    public static final BitSet FOLLOW_synchronizer_decls_in_prog412 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_prog414 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_synchronizer_decl_in_synchronizer_decls427 = new BitSet(new long[]{0x0000000000010002L});
    public static final BitSet FOLLOW_synchronizer_decls_in_synchronizer_decls436 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_synchronizer_decl456 = new BitSet(new long[]{0x0000000008800000L});
    public static final BitSet FOLLOW_generic_para_list_in_synchronizer_decl463 = new BitSet(new long[]{0x0000000008000000L});
    public static final BitSet FOLLOW_para_list_in_synchronizer_decl468 = new BitSet(new long[]{0x0000000000400000L});
    public static final BitSet FOLLOW_22_in_synchronizer_decl471 = new BitSet(new long[]{0x0000000448010100L});
    public static final BitSet FOLLOW_disjunction_in_synchronizer_decl475 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_generic_para_list488 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_generic_para_decl_in_generic_para_list490 = new BitSet(new long[]{0x0000000003000000L});
    public static final BitSet FOLLOW_24_in_generic_para_list494 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_generic_para_decl_in_generic_para_list496 = new BitSet(new long[]{0x0000000003000000L});
    public static final BitSet FOLLOW_25_in_generic_para_list501 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_generic_para_decl516 = new BitSet(new long[]{0x0000000004000002L});
    public static final BitSet FOLLOW_26_in_generic_para_decl519 = new BitSet(new long[]{0x00000020000380E0L});
    public static final BitSet FOLLOW_const_value_in_generic_para_decl521 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_27_in_para_list542 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_para_in_para_list544 = new BitSet(new long[]{0x0000000011000000L});
    public static final BitSet FOLLOW_24_in_para_list548 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_para_in_para_list550 = new BitSet(new long[]{0x0000000011000000L});
    public static final BitSet FOLLOW_28_in_para_list555 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_para567 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_single_sync_in_disjunction585 = new BitSet(new long[]{0x0000000020000002L});
    public static final BitSet FOLLOW_29_in_disjunction593 = new BitSet(new long[]{0x0000000448010100L});
    public static final BitSet FOLLOW_single_sync_in_disjunction597 = new BitSet(new long[]{0x0000000020000002L});
    public static final BitSet FOLLOW_sync_ref_in_single_sync621 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_conjunction_in_single_sync628 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_map_in_single_sync636 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_single_sync643 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_27_in_single_sync650 = new BitSet(new long[]{0x0000000448010100L});
    public static final BitSet FOLLOW_disjunction_in_single_sync652 = new BitSet(new long[]{0x0000000010000000L});
    public static final BitSet FOLLOW_28_in_single_sync654 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_conjunction672 = new BitSet(new long[]{0x0000000448010500L});
    public static final BitSet FOLLOW_var_decl_in_conjunction678 = new BitSet(new long[]{0x0000000448010100L});
    public static final BitSet FOLLOW_disjunction_in_conjunction686 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_31_in_conjunction688 = new BitSet(new long[]{0x0000000548010100L});
    public static final BitSet FOLLOW_disjunction_in_conjunction697 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_31_in_conjunction699 = new BitSet(new long[]{0x0000000548010100L});
    public static final BitSet FOLLOW_32_in_conjunction706 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_VAR_in_var_decl718 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_var_decl722 = new BitSet(new long[]{0x0000000081000000L});
    public static final BitSet FOLLOW_24_in_var_decl726 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_var_decl730 = new BitSet(new long[]{0x0000000081000000L});
    public static final BitSet FOLLOW_31_in_var_decl736 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_sync_ref749 = new BitSet(new long[]{0x0000000008800000L});
    public static final BitSet FOLLOW_generic_arg_list_in_sync_ref756 = new BitSet(new long[]{0x0000000008000000L});
    public static final BitSet FOLLOW_var_list_in_sync_ref760 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_generic_arg_list771 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_NAME_in_generic_arg_list773 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_26_in_generic_arg_list775 = new BitSet(new long[]{0x00000020000380E0L});
    public static final BitSet FOLLOW_const_value_in_generic_arg_list777 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_generic_arg_list779 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_27_in_var_list792 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_var_list796 = new BitSet(new long[]{0x0000000011000000L});
    public static final BitSet FOLLOW_24_in_var_list803 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_var_list807 = new BitSet(new long[]{0x0000000011000000L});
    public static final BitSet FOLLOW_28_in_var_list813 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_varexpr_in_expr834 = new BitSet(new long[]{0x0000001804000000L});
    public static final BitSet FOLLOW_var_in_expr846 = new BitSet(new long[]{0x0000001804000000L});
    public static final BitSet FOLLOW_op_in_expr855 = new BitSet(new long[]{0x00000024000380E0L});
    public static final BitSet FOLLOW_varexpr_in_expr864 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_expr874 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_const_value_no_ref_in_expr885 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_varexpr911 = new BitSet(new long[]{0x0000000200000000L});
    public static final BitSet FOLLOW_33_in_varexpr913 = new BitSet(new long[]{0x00000020000380E0L});
    public static final BitSet FOLLOW_const_value_in_varexpr917 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_varexpr929 = new BitSet(new long[]{0x0000000200000000L});
    public static final BitSet FOLLOW_33_in_varexpr931 = new BitSet(new long[]{0x0000000400000000L});
    public static final BitSet FOLLOW_34_in_varexpr933 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr937 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_34_in_varexpr945 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr949 = new BitSet(new long[]{0x0000000200000000L});
    public static final BitSet FOLLOW_33_in_varexpr951 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr955 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_34_in_varexpr962 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr966 = new BitSet(new long[]{0x0000000200000000L});
    public static final BitSet FOLLOW_33_in_varexpr968 = new BitSet(new long[]{0x0000000400000000L});
    public static final BitSet FOLLOW_34_in_varexpr970 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr974 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_op992 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_35_in_op1002 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_36_in_op1011 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FOR_in_map1027 = new BitSet(new long[]{0x0000002000000000L});
    public static final BitSet FOLLOW_map_var_list_in_map1033 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IN_in_map1039 = new BitSet(new long[]{0x0000002000800000L});
    public static final BitSet FOLLOW_dict_list_in_map1043 = new BitSet(new long[]{0x0000000448010100L});
    public static final BitSet FOLLOW_single_sync_in_map1048 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_37_in_map_var_list1059 = new BitSet(new long[]{0x0000000000810000L});
    public static final BitSet FOLLOW_entry_bind_in_map_var_list1061 = new BitSet(new long[]{0x0000004001000000L});
    public static final BitSet FOLLOW_24_in_map_var_list1065 = new BitSet(new long[]{0x0000000000810000L});
    public static final BitSet FOLLOW_entry_bind_in_map_var_list1067 = new BitSet(new long[]{0x0000004001000000L});
    public static final BitSet FOLLOW_38_in_map_var_list1072 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_entry_bind1085 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_entry_bind1093 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_entry_bind1097 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_entry_bind1099 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_entry_bind1103 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_entry_bind1105 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_37_in_dict_list1119 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_23_in_dict_list1125 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_dict_list1133 = new BitSet(new long[]{0x0000004003000000L});
    public static final BitSet FOLLOW_24_in_dict_list1140 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_dict_list1144 = new BitSet(new long[]{0x0000004003000000L});
    public static final BitSet FOLLOW_set_in_dict_list1152 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_var1173 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_value_ref_in_const_value1188 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_const_value_no_ref_in_const_value1195 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_boolean_value_in_const_value_no_ref1211 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_string_in_const_value_no_ref1219 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NUMBER_in_const_value_no_ref1226 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NULL_in_const_value_no_ref1233 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_37_in_const_value_no_ref1240 = new BitSet(new long[]{0x00000060000380E0L});
    public static final BitSet FOLLOW_value_list_in_const_value_no_ref1242 = new BitSet(new long[]{0x0000004000000000L});
    public static final BitSet FOLLOW_38_in_const_value_no_ref1245 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_const_value_in_value_list1265 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_24_in_value_list1272 = new BitSet(new long[]{0x00000020000380E0L});
    public static final BitSet FOLLOW_const_value_in_value_list1276 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_TRUE_in_boolean_value1295 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FALSE_in_boolean_value1302 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_value_ref1317 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STRING_in_string1332 = new BitSet(new long[]{0x0000000000000002L});

}